#ifndef __MAX7219_H__
#define __MAX7219_H__

#define Addr_Decode_Mode  0x09
#define Addr_Intensity 	  0x0a
#define Addr_Scan_Limit   0x0b
#define Addr_Shutdowm     0x0c
#define Addr_Display_Test 0x0f
#define Addr_Digit1       0x01
#define Addr_Digit2       0x02
#define Addr_Digit3       0x03
#define Addr_Digit4       0x04
#define Addr_Digit5       0x05
#define Addr_Digit6       0x06
#define Addr_Digit7       0x07
#define Addr_Digit8       0x08

void DelayMs(unsigned int x);
void WriteMax7219Byte(unsigned char DATA);
void WriteMax7219(unsigned char address, unsigned char dat);
void Max7219_Clear();
void Max7219_Init();

#endif